-- GENERATED SPELL FOR [Storming Vortex] --


function spell0_28547(pUnit, Event) --@Cyclone,n/a--
pUnit:FullCastSpellOnTarget(60236,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28547', 5500, 1)
end

function spell1_28547(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(53044,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28547', 2000, 1)
end

function spell2_28547(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(59169,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28547', 2000, 1)
end

function Sorts_28547(pUnit, Event)
local choix_sorts_28547 = math.random(0, 2)
if choix_sorts_28547 == 0 then
pUnit:RegisterEvent('spell0_28547', 1, 1)
end
if choix_sorts_28547 == 1 then
pUnit:RegisterEvent('spell1_28547', 1, 1)
end
if choix_sorts_28547 == 2 then
pUnit:RegisterEvent('spell2_28547', 1, 1)
end
end

function mob28547_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28547', math.random(1500, 3000), 1)
end

function mob28547_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28547_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28547_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28547, 1, 'mob28547_Action')
RegisterUnitEvent(28547, 2, 'mob28547_Leave')
RegisterUnitEvent(28547, 3, 'mob28547_Kill')
RegisterUnitEvent(28547, 4, 'mob28547_Die')
